don't send a 0 length buffer.
authorJonathan Blandford <jrb@redhat.com>
Thu, 28 Oct 1999 19:30:11 +0000 (19:30 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Thu, 28 Oct 1999 19:30:11 +0000 (19:30 +0000)
1999-10-28  Jonathan Blandford  <jrb@redhat.com>

* src/gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): don't send a
0 length buffer.

gdk-pixbuf/gdk-pixbuf-loader.c
gdk-pixbuf/io-gif.c
gdk/gdkpixbuf-render.c
gtk/gdk-pixbuf-loader.c

index c7c6c5cca60012c6a98471267140fc0ee66f102b..db734ef63199cd954fb89ad38041e6ea55b5571f 100644 (file)
@@ -292,7 +292,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, guchar *buf, size_t count)
                                 * to send the rest of the buffer.
                                 */
 
-                               if (retval && (priv->buf_offset + count) >= 128) {
+                               if (retval && (priv->buf_offset + count) > 128) {
                                        retval = (* priv->image_module->load_increment) (
                                                priv->context,
                                                buf,
index 38080c8e495cb8d71cb3ed9991315330dede1883..7e19014d49d97f625bf1b72a5945dcea1dbe311a 100644 (file)
@@ -216,7 +216,7 @@ myInputFunc (GifFileType *type, GifByteType *byte, int length)
 {
        GifData *context;
 
-       context = (GifData *) type->UserData;
+       context = (GifData *) (type->UserData);
        g_print ("in myInputFunc\nSize requested is %d\n", length);
 
        if (length > context->size - context->ptr) {
index 87f508c40b518ab53a6be378af9d4cc9b15097a0..312f4b1833e1aecf6eae2f14c3265f8d0ef497ba 100644 (file)
@@ -168,9 +168,9 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkDrawable *drawable,
        /* Sigh, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we
         * have to pack the buffer first.
         */
-       if (apb->has_alpha)
-               buf = remove_alpha (apb, src_x, src_y, width, height, &rowstride);
-       else {
+       if (apb->has_alpha) {
+//             buf = remove_alpha (apb, src_x, src_y, width, height, &rowstride);
+       else {
                buf = apb->pixels + src_y * apb->rowstride + src_x * 3;
                rowstride = apb->rowstride;
        }
index c7c6c5cca60012c6a98471267140fc0ee66f102b..db734ef63199cd954fb89ad38041e6ea55b5571f 100644 (file)
@@ -292,7 +292,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader, guchar *buf, size_t count)
                                 * to send the rest of the buffer.
                                 */
 
-                               if (retval && (priv->buf_offset + count) >= 128) {
+                               if (retval && (priv->buf_offset + count) > 128) {
                                        retval = (* priv->image_module->load_increment) (
                                                priv->context,
                                                buf,